home *** CD-ROM | disk | FTP | other *** search
/ Pro One: Netcracker Netscape Navigator / ProOne: Netcracker Netscape Navigator.iso / pc / nc / nct06020.geo / 00084.ls < prev    next >
Encoding:
Text File  |  1997-03-19  |  3.9 KB  |  176 lines

  1. on startMovie
  2.   Set_CDcounter(4)
  3.   initLesson()
  4.   CheckForTagWd()
  5. end
  6.  
  7. on HideLastStep
  8.   RestoreHilites()
  9. end
  10.  
  11. on TheinitCursor
  12.   initCursorCastNum()
  13.   initCursorList(1)
  14.   set CursorCastNum to getCursor(2)
  15.   cursor([CursorCastNum, CursorCastNum + 1])
  16. end
  17.  
  18. on checkScreenStatus
  19.   CheckRollOver()
  20.   CheckSnakeStatus()
  21.   go(the frame)
  22. end
  23.  
  24. on BlinkNext
  25.   if (the timer > getTimer()) and not soundBusy(2) then
  26.     startTimer()
  27.     if the name of cast the castNum of sprite get_NEXTSprite() = "NEXT" then
  28.       set the castNum of sprite get_NEXTSprite() to the number of cast "NEXT_E"
  29.     else
  30.       set the castNum of sprite get_NEXTSprite() to the number of cast "NEXT"
  31.     end if
  32.   end if
  33. end
  34.  
  35. on GoNext
  36.   if not get_Disabled() then
  37.     sound stop 2
  38.     if Get_NEXT() = 4 then
  39.       GoNextMovie()
  40.     else
  41.       go("t" & Get_NEXT())
  42.     end if
  43.     Set_NEXT(Get_NEXT() + 1)
  44.   end if
  45. end
  46.  
  47. on playTheTSound theTSnd
  48.   PlaySound("NCT06020.s0" & theTSnd)
  49. end
  50.  
  51. on stopMovie
  52.   sound stop 1
  53.   unLoad()
  54.   setEmptyCursor()
  55. end
  56.  
  57. on GoNextMovie
  58.   PlaySound("GOSOUND.SO1")
  59.   SaveHilite()
  60.   Add_CDcounter(1)
  61.   set cdNum to Get_CDcounter()
  62.   set movieName to item cdNum of Get_CurrentSnakeScreens()
  63.   go("INIT" & Get_ScreenSubject(), movieName & ".GEO")
  64. end
  65.  
  66. on visLamp bool
  67.   set the visible of sprite 33 to bool
  68.   set the visible of sprite 34 to bool
  69. end
  70.  
  71. on InitLamp
  72.   visLamp(0)
  73.   UpdateCursors(34, 0)
  74.   set the castNum of sprite 32 to the number of cast "lamp_Off"
  75.   UpdateCursors(32, 3)
  76. end
  77.  
  78. on unSetMouseEvents
  79.   global puppetList
  80.   set puppetList to []
  81.   repeat with i = 1 to 48
  82.     add(puppetList, the puppet of sprite i)
  83.     if not (the puppet of sprite i) then
  84.       set the puppet of sprite i to 1
  85.     end if
  86.   end repeat
  87.   play frame "outLamp"
  88. end
  89.  
  90. on setMouseEvents
  91.   global puppetList
  92.   set the mouseDownScript to EMPTY
  93.   set the mouseUpScript to EMPTY
  94.   set the keyDownScript to EMPTY
  95.   set the keyUpScript to EMPTY
  96.   repeat with i = 1 to 48
  97.     if getAt(puppetList, i) = 0 then
  98.       set the puppet of sprite i to 0
  99.     end if
  100.   end repeat
  101.   play done
  102. end
  103.  
  104. on dont
  105.   dontPassEvent()
  106. end
  107.  
  108. on HandleLamp
  109.   sound stop 2
  110.   if the name of cast the castNum of sprite 32 = "lamp_On" then
  111.     set the castNum of sprite 32 to the number of cast "lamp_Off"
  112.     set the castNum of sprite 34 to the number of cast "EXITLAMP"
  113.     set the visible of sprite 33 to 0
  114.     set the visible of sprite 34 to 0
  115.     UpdateCursors(34, 0)
  116.     unSetMouseEvents()
  117.   else
  118.     set the castNum of sprite 32 to the number of cast "lamp_On"
  119.     UpdateCursors(34, 3)
  120.     set the visible of sprite 33 to 1
  121.     set the visible of sprite 34 to 1
  122.     updateStage()
  123.     PlaySound("NCT06020.T01")
  124.     displayTip(34)
  125.   end if
  126.   updateStage()
  127. end
  128.  
  129. on displayTip theExitBtnSp
  130.   global exitTheLoop
  131.   set exitTheLoop to 0
  132.   set the mouseDownScript to "dont"
  133.   set the mouseUpScript to "dont"
  134.   set the keyDownScript to "dont"
  135.   set the keyUpScript to "dont"
  136.   set the exitLock to 0
  137.   repeat while not exitTheLoop
  138.     if the mouseCast = the number of cast "EXITLAMP" then
  139.       set the cursor of sprite 48 to [404, 405]
  140.     else
  141.       set the cursor of sprite 48 to [400, 401]
  142.     end if
  143.     if the mouseDown and (the mouseCast = the number of cast "EXITLAMP") then
  144.       switchExitLampButt(theExitBtnSp, "EXITLAMP_D")
  145.     end if
  146.   end repeat
  147.   set the exitLock to 1
  148.   set the cursor of sprite 48 to 0
  149.   HandleLamp()
  150. end
  151.  
  152. on switchExitLampButt spriteNum, castDown
  153.   global exitTheLoop
  154.   set flag to 0
  155.   set SaveCast to the castNum of sprite spriteNum
  156.   set flag to swapExitLampCast(spriteNum, SaveCast, castDown)
  157.   repeat while the mouseDown
  158.     set flag to swapExitLampCast(spriteNum, SaveCast, castDown)
  159.   end repeat
  160.   if flag = 1 then
  161.     set exitTheLoop to 1
  162.   end if
  163. end
  164.  
  165. on swapExitLampCast spriteNum, SaveCast, castDown
  166.   if rollOver(spriteNum) then
  167.     set the castNum of sprite spriteNum to the number of cast castDown
  168.     updateStage()
  169.     return 1
  170.   else
  171.     set the castNum of sprite spriteNum to the number of cast SaveCast
  172.     updateStage()
  173.     return 0
  174.   end if
  175. end
  176.